//
//  TeachCtryHead.m
//  test
//
//  Created by 朱圳 on 2018/3/19.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "TeachCtryHead.h"

@implementation TeachCtryHead


- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews{
    
    UILabel *timeLab = [[UILabel alloc]init];
    timeLab.text = @"时间";
    timeLab.textColor = [UIColor darkGrayColor];
    timeLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:timeLab];
    [timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        [make.top.mas_equalTo(self.contentView) setOffset:10];
        [make.left.mas_equalTo(self.contentView) setOffset:15];
        make.centerY.mas_equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake((ScreenWidth-30)/3, 40));
    }];
    
    UILabel *nameLab = [[UILabel alloc]init];
    nameLab.text = @"姓名";
    nameLab.textColor = [UIColor darkGrayColor];
    nameLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:nameLab];
    [nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(timeLab);
        make.left.mas_equalTo(timeLab.mas_right);
        make.centerY.mas_equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake((ScreenWidth-30)/3, 40));
    }];
    
    UILabel *operationLab = [[UILabel alloc]init];
    operationLab.text = @"电话";
    operationLab.textColor = [UIColor darkGrayColor];
    operationLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:operationLab];
    [operationLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(timeLab);
        make.left.mas_equalTo(nameLab.mas_right);
        make.centerY.mas_equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake((ScreenWidth-30)/3, 40));
    }];
    
    /**********************分割线******************************/
    
    //顶部
    UIView *xview = [[UIView alloc]init];
    xview.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview];
    [xview mas_makeConstraints:^(MASConstraintMaker *make) {
        [make.left.mas_equalTo(self) setOffset:15];
        make.top.mas_equalTo(timeLab);
        make.height.mas_equalTo(0.8);
        [make.right.mas_equalTo(self) setOffset:-15];
    }];
    //底部
    UIView *xview1 = [[UIView alloc]init];
    xview1.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview1];
    [xview1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self);
        make.height.mas_equalTo(0.8);
        [make.left.mas_equalTo(self) setOffset:15];
        [make.right.mas_equalTo(self) setOffset:-15];
    }];
    //竖线1
    UIView *xview2 = [[UIView alloc]init];
    xview2.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview2];
    [xview2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(nameLab.mas_left);
        make.bottom.mas_equalTo(self);
        [make.top.mas_equalTo(self.contentView) setOffset:10];
        make.width.mas_equalTo(0.8);
    }];
    
    //竖线2
    UIView *xview3 = [[UIView alloc]init];
    xview3.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview3];
    [xview3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(operationLab.mas_left);
        make.bottom.mas_equalTo(self);
        [make.top.mas_equalTo(self.contentView) setOffset:10];
        make.width.mas_equalTo(0.8);
    }];
    
    UIView *xview4 = [[UIView alloc]init];
    xview4.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview4];
    [xview4 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(timeLab.mas_left);
        make.bottom.mas_equalTo(self);
        [make.top.mas_equalTo(self.contentView) setOffset:10];
        make.width.mas_equalTo(0.8);
    }];
    
    UIView *xview5 = [[UIView alloc]init];
    xview5.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:xview5];
    [xview5 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(operationLab.mas_right);
        make.bottom.mas_equalTo(self);
        [make.top.mas_equalTo(self.contentView) setOffset:10];
        make.width.mas_equalTo(0.8);
    }];
    
}

@end
